How to Test Event-Based Alerts
This guide outlines the recommended workflow for testing your event-based alerts.
1. Verify Alert Exists in Corva UI
Before testing, ensure that your alert is created and visible in the Corva UI under the Alerts tab.
2. Manually Trigger Alerts with Postman
Use Postman or a similar API testing tool to manually trigger the alert via an API call. For example, you can use the following cURL command:
curl --location 'https://api.corva.ai/v1/alerts/definitions/trigger/' \
--header 'Authorization: API YOUR_KEY' \
--header 'Content-Type: application/json' \
--data '{
"identifier": "block_max_speed_test",
"asset_id": 612332952
}'
Expected Responses
{
"status": "OK",
"alerts": ["alerts_data"]
}
- Successful Trigger: If the response returns a
200 OK
status and thealerts
array contains data, the alert was triggered successfully. - No Trigger: If you receive a
200 OK
status but thealerts
array is empty, it means the alert was not triggered.
Example of a Succesful Trigger:
{
"status": "OK",
"alerts": [
{
"id": 12496502,
"alert_definition_id": 14756,
"asset_id": 12345566,
"data": {
"app": "corva.witsml-source",
"start": "2025-02-18T08:43:28.154Z",
"finish": "2025-02-18T09:13:28.154Z",
"end_doc": null,
"end_rop": 0,
"end_tvd": 8796.689,
"version": 1,
"asset_id": 12345566,
"metadata": {
"mud": "67b381ce55c49f0216cdb13a",
"casing": "67b2b8ff55c49f0172c82a39",
"rig_id": null,
"cuttings": null,
"drillstring": null,
"plan_survey": "67b3bf2404ba7f0152a0f805",
"actual_survey": "675db943897fd6015f555138",
"surface-equipment": "6753163dc68cfb014ccb7079"
},
"provider": "corva",
"end_state": "In Slips",
"start_doc": null,
"start_rop": 0,
"start_tvd": 8796.689,
"timestamp": 1739869993,
"collection": "wits",
"company_id": 346,
"end_ad rop": null,
"end_gas_c1": null,
"end_gas_c2": null,
"end_gas_c3": null,
"end_n2 out": null,
"end_oxygen": null,
"end_dba heave compensator amplitude": null,
"end_dba mud addition removal volume": null,
"end_dba mud volume connection delta": null,
"end_dba mud volume total fault code": null,
"end_dba rotary opt drill index inst": null,
"end_dba top drive torque fault code": null,
"end_kz ad offset calculation status": null,
"end_kz carbonate stringer detection": null,
"end_mwd - picos de choques axiales": null,
"end_rss_desired_steering_proportion_prds": null,
"start_kz mwd stickslip severity error cap": null,
"start_mwd - laterall vibration diagnostic": null,
"start_mwd - torsional vibration diagnostic": null,
"start_rss_desired_steering_proportion_prds": null,
"end_kz internal ss percentage max threshold": null,
"end_kz mwd stickslip severity max threshold": null,
"end_rss_effective_steering_proportion_propeff": null,
"start_kz internal ss percentage max threshold": null,
"start_kz mwd stickslip severity max threshold": null,
"start_rss_effective_steering_proportion_propeff": null
},
"created_at": "2025-02-18T09:13:28.338Z",
"updated_at": "2025-02-18T09:13:28.338Z",
"alert_at": "2025-02-18T09:13:28.154Z",
"decision_path": null,
"status": "open",
"occurrences": 1,
"last_alert_at": "2025-02-18T09:13:28.154Z",
"closed_at": null,
"company_id": 346,
"validated": false,
"validated_at": null,
"validated_by_id": null,
"comments_amount": 0,
"likes_count": 0,
"report": null,
"alert_classification": "unclassified",
"classified_by_id": null,
"classified_at": null,
"acknowledged": false,
"acknowledged_by_id": null,
"acknowledged_at": null,
"latest_data": {
"app": "corva.witsml-source",
"start": "2025-02-18T08:43:28.154Z",
"finish": "2025-02-18T09:13:28.154Z",
"end_doc": null,
"end_rop": 0,
"end_tvd": 8796.689,
"version": 1,
"asset_id": 72328631,
"metadata": {
"mud": "67b381ce55c49f0216cdb13a",
"casing": "67b2b8ff55c49f0172c82a39",
"rig_id": null,
"cuttings": null,
"drillstring": null,
"plan_survey": "67b3bf2404ba7f0152a0f805",
"actual_survey": "675db943897fd6015f555138",
"surface-equipment": "6753163dc68cfb014ccb7079"
},
"provider": "corva",
"end_state": "In Slips",
"start_doc": null,
"start_rop": 0,
"start_tvd": 8796.689,
"timestamp": 1739869993,
"collection": "wits",
"company_id": 346,
"end_ad rop": null,
"end_gas_c1": null,
"end_pipe od": null,
"end_rigtime": "2025-02-18T06:13:13-03:00",
"end_rpm bit": 0,
"end_spare74": null,
"end_spare81": null,
"end_srv_azi": null,
"end_srv_inc": null,
"end_temp_in": null,
"start_state": "In Slips",
"end_bit size": null,
"end_dens_out": null,
}
}
]
}
3. Start Simple and Gradually Add Complexity
We recommend keeping the logic of your flow simple at the beginning. Start with a basic if-else
condition to test alert triggering. Once you are confident that the app behaves as expected, you can incrementally add more complex logic and conditions.
🎯 Happy Testing!